package com.shangjinrong.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 用户基本信息
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_info")
public class UserInfo {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 1：出借人 2：借款人
     */
    @TableField(value = "user_type")
    private Byte userType;

    /**
     * 手机号
     */
    @TableField(value = "mobile")
    private String mobile;

    /**
     * 用户密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 用户昵称
     */
    @TableField(value = "nick_name")
    private String nickName;

    /**
     * 用户姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 身份证号
     */
    @TableField(value = "id_card")
    private String idCard;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 微信用户标识openid
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 头像
     */
    @TableField(value = "head_img")
    private String headImg;

    /**
     * 绑定状态（0：未绑定，1：绑定成功 -1：绑定失败）
     */
    @TableField(value = "bind_status")
    private Byte bindStatus;

    /**
     * 借款人认证状态（0：未认证 1：认证中 2：认证通过 -1：认证失败）
     */
    @TableField(value = "borrow_auth_status")
    private Byte borrowAuthStatus;

    /**
     * 绑定账户协议号
     */
    @TableField(value = "bind_code")
    private String bindCode;

    /**
     * 用户积分
     */
    @TableField(value = "integral")
    private Integer integral;

    /**
         * 状态（0：锁定 1：正常）
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(1:已删除，0:未删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean isDeleted;

    public static final String COL_ID = "id";

    public static final String COL_USER_TYPE = "user_type";

    public static final String COL_MOBILE = "mobile";

    public static final String COL_PASSWORD = "password";

    public static final String COL_NICK_NAME = "nick_name";

    public static final String COL_NAME = "name";

    public static final String COL_ID_CARD = "id_card";

    public static final String COL_EMAIL = "email";

    public static final String COL_OPENID = "openid";

    public static final String COL_HEAD_IMG = "head_img";

    public static final String COL_BIND_STATUS = "bind_status";

    public static final String COL_BORROW_AUTH_STATUS = "borrow_auth_status";

    public static final String COL_BIND_CODE = "bind_code";

    public static final String COL_INTEGRAL = "integral";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";
}
